package com.dh.web;

import com.dh.repository.UserRepository;
import org.apache.shiro.authz.annotation.RequiresUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class IndexController {
    @Autowired
    private UserRepository userRepository;



    @RequestMapping(value = {"index", "/"})
    @RequiresUser
    public String index() {
        return "redirect:/admin/user/list";
    }

    @RequestMapping("login")
    public String login() {
        return "login";
    }


}
